import numpy as np
data = np.sin(np.arange(20)).reshape(5,4)
#得到每列的最大值组成的一维数组
def action():
    ind = data.argmax(axis = 0)
    return data[ind, range(data.shape[1])]

def test_action():
    np.testing.assert_allclose(action(), [0.98935825, 0.84147098, 0.99060736, 0.6569866])
